//
//  BaseView.swift
//  SwiftWeather
//
//  Created by shen on 2023/8/28.
//

import UIKit

protocol BaseViewSetup: AnyObject {
    func configureAppearance()
    func setupViews()
    func constraintViews()
}

class BaseView: UIView {
    // MARK: - Initialization

    override init(frame: CGRect) {
        super.init(frame: frame)
        configureAppearance()
        setupViews()
        constraintViews()
    }

    @available(*, unavailable)
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}

// MARK: - BaseViewSetup

@objc extension BaseView: BaseViewSetup {
    func configureAppearance() {}

    func setupViews() {}

    func constraintViews() {}
}
